package com.aids_malaria.http.response;

import com.aids_malaria.util.GsonUtil;

import java.io.Serializable;

public class DrugallergyInfo implements Serializable {

    private String identity_code;
    private int record_seq;
    private String  allergy_info; // 过敏史
    private String allergy_drug; // 过敏药史
    private String adverse_reactions; // 不良反应
    private String investor; // 调查者
    private String create_time; // 创建时间
    private String update_time; // 更新时间
    private String invest_time; // 调查时间

    public static DrugallergyInfo copyFromPack(DrugallergyInfoPack drugallergyInfoPack){
        DrugallergyInfo drugallergyInfo = new DrugallergyInfo();
        drugallergyInfo.setIdentity_code(drugallergyInfoPack.getIdentity_code());
        drugallergyInfo.setRecord_seq(drugallergyInfoPack.getRecord_seq());
        drugallergyInfo.setAllergy_info(drugallergyInfoPack.getAllergy_info());
        drugallergyInfo.setAllergy_drug(drugallergyInfoPack.getAllergy_drug());
        drugallergyInfo.setInvestor(drugallergyInfoPack.getInvestor());
        drugallergyInfo.setCreate_time(drugallergyInfoPack.getCreate_time());
        drugallergyInfo.setUpdate_time(drugallergyInfoPack.getUpdate_time());
        drugallergyInfo.setInvest_time(drugallergyInfoPack.getInvest_time());

        drugallergyInfo.setAdverse_reactions(GsonUtil.beanToJson(drugallergyInfoPack.getAdverse_reactions_json()));

        return drugallergyInfo;
    }

    public String getIdentity_code() {
        return identity_code;
    }

    public void setIdentity_code(String identity_code) {
        this.identity_code = identity_code;
    }

    public int getRecord_seq() {
        return record_seq;
    }

    public void setRecord_seq(int record_seq) {
        this.record_seq = record_seq;
    }

    public String getAllergy_info() {
        return allergy_info;
    }

    public void setAllergy_info(String allergy_info) {
        this.allergy_info = allergy_info;
    }

    public String getAllergy_drug() {
        return allergy_drug;
    }

    public void setAllergy_drug(String allergy_drug) {
        this.allergy_drug = allergy_drug;
    }

    public String getAdverse_reactions() {
        return adverse_reactions;
    }

    public void setAdverse_reactions(String adverse_reactions) {
        this.adverse_reactions = adverse_reactions;
    }

    public String getInvestor() {
        return investor;
    }

    public void setInvestor(String investor) {
        this.investor = investor;
    }

    public String getCreate_time() {
        return create_time;
    }

    public void setCreate_time(String create_time) {
        this.create_time = create_time;
    }

    public String getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(String update_time) {
        this.update_time = update_time;
    }

    public String getInvest_time() {
        return invest_time;
    }

    public void setInvest_time(String invest_time) {
        this.invest_time = invest_time;
    }

    @Override
    public String toString() {
        return "DrugallergyInfo{" +
                "identity_code='" + identity_code + '\'' +
                ", record_seq=" + record_seq +
                ", allergy_info='" + allergy_info + '\'' +
                ", allergy_drug='" + allergy_drug + '\'' +
                ", adverse_reactions='" + adverse_reactions + '\'' +
                ", investor='" + investor + '\'' +
                ", create_time='" + create_time + '\'' +
                ", update_time='" + update_time + '\'' +
                ", invest_time='" + invest_time + '\'' +
                '}';
    }
}
